<template>
  <button @click="componentName='Option'">选项式Store</button>
  <button @click="componentName='Setup'">组合式Store</button>

  <component :is="componentName"></component>
</template>

<script>

import {defineComponent} from 'vue';
import Option from '@/components/Option.vue';
import Setup from '@/components/Setup.vue';

export default defineComponent({
  components: {Setup, Option},
  data() {
    return {
      componentName: ''
    };
  }
});
</script>

<style scoped>
button {
  margin-right: 10px;
  margin-bottom: 20px;
}
</style>
